﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Ekinwt.OpenIDConsumerLib.LibSettings
{
    public class CheckIDSetupSettings
    {
        private static string m_ReturnTo;
        private static string m_TrustRoot;
        private static string m_RequiredFields;
        private static string m_OptionalFields;

        /// <summary>
        /// 获得或设置验证之后返回的Url
        /// </summary>
        public static string ReturnTo
        {
            get 
            {
                if (string.IsNullOrEmpty(CheckIDSetupSettings.m_ReturnTo))
                {
                    throw new NullReferenceException("ReturnTo 未被初始化!");
                }
                return m_ReturnTo; 
            }
            set 
            {
                m_ReturnTo = value; 
            }
        }

        /// <summary>
        /// 获得或设置用户用来确认是否信任的Url
        /// </summary>
        public static string TrustRoot
        {
            get 
            {
                return m_TrustRoot; 
            }
            set 
            {
                m_TrustRoot = value; 
            }
        }

        /// <summary>
        /// 获得或设置请求的字段,请求多个字段以逗号","分隔
        /// </summary>
        public static string RequiredFields
        {
            get
            {
                return m_RequiredFields;
            }
            set
            {
                m_RequiredFields = value;
            }
        }

        /// <summary>
        /// 获得或设置请求的选填字段,多个字段以逗号","分隔
        /// </summary>
        public static string OptionalFields
        {
            get
            {
                return m_OptionalFields;
            }
            set
            {
                m_OptionalFields = value;
            }
        }
    }
}
